/**
 * 北京中流科技有限公司 版权所有
 * http://www.chinasoa.com.cn
 */
package cn.com.chinasoa.course.subscribe.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Version;

/**
 * @author 刘洋(liuyang@chinasoa.com.cn)
 * 2007-10-31上午01:33:40
 * 计划实施的课程
 */
@Entity
public class ArrangedCourse implements Serializable {

	private static final long serialVersionUID = 5243386238436750041L;
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO) 
	private long id;
	@Version
	private int version;
	//课程标题
	@Column(nullable=false)
	private String courseTitle;
	//讲授科目
	@ManyToOne(cascade=CascadeType.REFRESH,optional=false,fetch=FetchType.EAGER)
	private TrainingSubject trainingSubject;
	//课程介绍
	@Column(nullable=false)
	private String courseDescription;
	//培训地点
	@ManyToOne(cascade=CascadeType.REFRESH,optional=false,fetch=FetchType.EAGER)
	private TrainingAddress trainingAddress;
	//优惠措施
	@OneToMany(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER)
	private List<PrivilegeStrategy> privilegeStrategys = new ArrayList<PrivilegeStrategy>();
	//开始日期 2007年11月13日
	@Column(nullable=false)
	private Calendar startDate;
	//结束日期: 2007年11月14日
	@Column(nullable=false)
	private Calendar endDate;

	public String getCourseDescription() {
		return courseDescription;
	}
	public void setCourseDescription(String courseDescription) {
		this.courseDescription = courseDescription;
	}
	public String getCourseTitle() {
		return courseTitle;
	}
	public void setCourseTitle(String courseTitle) {
		this.courseTitle = courseTitle;
	}
	public Calendar getEndDate() {
		return endDate;
	}
	public void setEndDate(Calendar endDate) {
		this.endDate = endDate;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}

	public Calendar getStartDate() {
		return startDate;
	}

	public void setStartDate(Calendar startDate) {
		this.startDate = startDate;
	}

	public TrainingAddress getTrainingAddress() {
		return trainingAddress;
	}
	public void setTrainingAddress(TrainingAddress trainingAddress) {
		this.trainingAddress = trainingAddress;
	}
	public TrainingSubject getTrainingSubject() {
		return trainingSubject;
	}
	public void setTrainingSubject(TrainingSubject trainingSubject) {
		this.trainingSubject = trainingSubject;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public List<PrivilegeStrategy> getPrivilegeStrategys() {
		return privilegeStrategys;
	}
	public void setPrivilegeStrategys(List<PrivilegeStrategy> privilegeStrategys) {
		this.privilegeStrategys = privilegeStrategys;
	}

}
